﻿using Basefr.App.Messages;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Paas.App.Interface.App.Messages
{
    public class SearchAppDataInput : QueryPagedInput
    {
        /// <summary>
        /// 应用Id
        /// </summary>
        public int ApplicationId { get; set; }
        /// <summary>
        /// 对象Id
        /// </summary>
        public Guid ObjectId { get; set; }
        /// <summary>
        /// 查询条件
        /// </summary>
        public Dictionary<string, object> Conditions { get; set; } = null;
    }
    public class SearchAppDataOutput: QueryPagedOutput<Dictionary<string, object>>
    {
        
    }

    public class SaveAppDataInput
    {
        /// <summary>
        /// 应用Id
        /// </summary>
        public int ApplicationId { get; set; }
        /// <summary>
        /// 对象Id
        /// </summary>
        public Guid ObjectId { get; set; }
        /// <summary>
        /// 表单Id(编辑时编辑按钮指定的表单Id，新增时新增按钮指定的表单Id）
        /// </summary>
        public Guid FormId { get; set; }
        /// <summary>
        /// 待更新数据或者新增数据
        /// </summary>
        public Dictionary<string, object> SetColumns{ get; set; } = null;
    }

    public class SaveAppDataOutput 
    {

    }

    public class DeleteAppDataInput : DeleteInput<Guid> {
        /// <summary>
        /// 应用Id
        /// </summary>
        public int ApplicationId { get; set; }
        /// <summary>
        /// 对象Id
        /// </summary>
        public Guid ObjectId { get; set; }
        /// <summary>
        /// 待删除数据，一般指定id，（避免传输除id以外的数据，否则可能会误删除，造成大量数据被删）
        /// </summary>
        //public Dictionary<string, object> Conditions { get; set; }
    }
    public class DeleteAppDataOutput : DeleteOutput { }

}
